home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_483 / td / td.asm < prev    next >
Assembly Source File  |  1992-05-06  |  14KB  |  546 lines

  1. *    TD V1.0
  2. *    By Preben Nielsen
  3. *
  4. *    Based on 'TrackDisplay' on Fish-disk 399 by Olaf Barthel.
  5. *
  6. *      TD is a program that continuously monitors and displays
  7. *    the current track for each connected floppy disk.
  8. *
  9. *      The size of the window and the use of colors in it depends on
  10. *    the version of the Kickstart/Workbench (1.2/1.3 vs. 2.?).
  11. *
  12. *    NOTE:    There's no need to 'RUN' or 'RUNBACK' this program from the
  13. *        CLI. It is auto-detaching.
  14. *
  15. *HISTORY
  16. *          Made with Hisoft V2.12
  17. *           January: Recieved 'Trackdisplay' on Fish-disk 399.
  18. *                    Nice program Olaf. Thanks.
  19. *
  20. *  V1.0   03-Mar-91: First working version.
  21. *         04-Mar-91: Added auto-detaching code.
  22. *         07-Mar-91: Uses 'PrintIText' instead of 'Move'/'Text'. Because of
  23. *                    this, my version used nearly twice the amount of
  24. *                    processor-time as the original (according to Xoper).
  25. *         15-Mar-91: Now uses 'Move'/'Text'. Code is now larger but faster.
  26. *         19-Apr-91: Made some modifications to make it look better
  27. *                    under WB2.0 (haven't actually tried it yet)
  28.  
  29.     OPT O+
  30.     OPT O1+            ; Tells when a branch could be optimised to short
  31.     OPT i+            ; Tells when '#' is probably missing
  32.  
  33. Prepare        MACRO
  34.         IFC        '\1','Exec_Call'
  35.         movea.l        4.W,A6
  36.         ENDC
  37.         IFC        '\1','Intuition_Call'
  38.         movea.l        IntBase(DB),A6
  39.         ENDC
  40.         IFC        '\1','Gfx_Call'
  41.         movea.l        GfxBase(DB),A6
  42.         ENDC
  43.         IFC        '\1','Dos_Call'
  44.         movea.l        DosBase(DB),A6
  45.         ENDC
  46.         ENDM
  47. CallLib        MACRO
  48.         jsr        _LVO\1(A6)
  49.         ENDM
  50. Call        MACRO
  51.         bsr        \1
  52.         ENDM
  53. Push        MACRO        Push <reg-list | All>
  54.         IFC        '\1','All'
  55.         movem.l        D0-D7/A0-A6,-(SP)
  56.         ENDC
  57.         IFNC        '\1','All'
  58.         movem.l        \1,-(SP)
  59.         ENDC
  60.         ENDM
  61. Pop        MACRO        Pop <reg-list | All>
  62.         IFC        '\1','All'
  63.         movem.l        (SP)+,D0-D7/A0-A6
  64.         ENDC
  65.         IFNC        '\1','All'
  66.         movem.l        (SP)+,\1
  67.         ENDC
  68.         ENDM
  69. rAPtr        MACRO        Name
  70. DefSiz        set        DefSiz+4
  71. DefPtr        set        DefPtr-4
  72. \1        =        DefPtr
  73.         ENDM
  74. rLong        MACRO        Name
  75. DefSiz        set        DefSiz+4
  76. DefPtr        set        DefPtr-4
  77. \1        =        DefPtr
  78.         ENDM
  79. rWord        MACRO        Name
  80. DefSiz        set        DefSiz+2
  81. DefPtr        set        DefPtr-2
  82. \1        =        DefPtr
  83.         ENDM
  84. rByte        MACRO        Name
  85. DefSiz        set        DefSiz+1
  86. DefPtr        set        DefPtr-1
  87. \1        =        DefPtr
  88.         ENDM
  89. rStorage    MACRO        Name,Size    ; Define storage
  90. DefSiz        set        DefSiz+\2
  91. DefPtr        set        DefPtr-\2
  92. \1        =        DefPtr
  93.         ENDM
  94. rEVEN        MACRO                ; Word boundary
  95.         IFNE        DefPtr&1
  96. DefPtr        set        DefPtr-1
  97. DefSiz        set        DefSiz+1
  98.         ENDC
  99.         ENDM
  100. rStart        MACRO                ; Define var section
  101. DefPtr        set        0
  102. DefSiz        set        0
  103.         ENDM
  104. rEnd        MACRO                ; End var section
  105. RelSize        =        DefSiz
  106.         ENDM
  107. rAlloc        MACRO                ; Allocate storage
  108.         link        DB,#-RelSize
  109.         ENDM
  110. rFree        MACRO                ; De-allocate storage
  111.         unlk        DB
  112.         ENDM
  113. rClear        MACRO                ; Reset all variables
  114.         movem.l        D0/A0,-(SP)
  115.         move.w        #RelSize-1,D0
  116.         move.l        DB,A0
  117. rClr.\@        clr.b        -(A0)
  118.         dbf        D0,rClr.\@
  119.         movem.l        (SP)+,D0/A0
  120.         ENDM
  121. Detach        MACRO        ; Detach <'process name'>,stacksize,processpri
  122.         SECTION        SingleSplit,CODE
  123. Start        Prepare        Exec_Call
  124.         suba.l        A1,A1
  125.         CallLib        FindTask        ; Find us
  126.         move.l        D0,A2
  127.         tst.l        pr_CLI(A2)
  128.         bne.S        SegSplit
  129.         jmp        ProcessStart        ; from WorkBench
  130. SegSplit    CallLib        Forbid            ; From Dos
  131.         lea        DName(PC),A1
  132.         CallLib        OldOpenLibrary
  133.         move.l        D0,D5
  134.         beq.S        3$
  135.         moveq        #ML_SIZE+1*ME_SIZE,D0
  136.         move.l        #MEMF_PUBLIC|MEMF_CLEAR,D1
  137.         CallLib        AllocMem        ; Allocate Memlist
  138.         move.l        D0,A2
  139.         tst.l        D0
  140.         beq.S        2$
  141.         move.l        #ProcessName,D1
  142.         moveq        #\3,D2            ; Priority
  143.         move.l        Start-4(PC),D3
  144.         move.l        #\2,D4            ; StackSize
  145.         move.l        D5,A6
  146.         CallLib        CreateProc
  147.         Prepare        Exec_Call
  148.         tst.l        D0
  149.         beq.S        1$
  150.         move.l        D0,A0
  151.         lea        -pr_MsgPort(A0),A0    ; Now we have process
  152.         not.l        pr_CLI(A0)        ; All MY programs will now think they were started from the CLI
  153.         lsl.l        #2,D3
  154.         subq.l        #4,D3
  155.         move.l        D3,A1
  156.         move.w        #1,ML_NUMENTRIES(A2)    ; MemList -> ml_NumEntries    = 1
  157.         move.l        A1,ML_ME+ME_ADDR(A2)    ; MemList -> ml_me[0].me_Addr    = Segment
  158.         move.l        (A1),ML_ME+ME_LENGTH(A2); MemList -> ml_me[0].me_Length    = Length
  159.         lea        TC_MEMENTRY(A0),A0
  160.         move.l        A2,A1
  161.         CallLib        AddTail            ; AddTail(&Process->pr_Task.tc_MemEntry,&MemList->ml_Node);
  162.         lea        Start-4(PC),A0
  163.         clr.l        (A0)            ; Split the segments
  164.         bra.S        2$
  165. 1$        move.l        A2,A1            ; CreateProc failed. Can't do anything then
  166.         moveq        #ML_SIZE+1*ME_SIZE,D0
  167.         CallLib        FreeMem
  168. 2$        move.l        D5,A1
  169.         CallLib        CloseLibrary
  170. 3$        CallLib        Permit
  171.         moveq        #0,D0
  172.         rts
  173. DName        dc.b        'dos.library',0
  174. ProcessName    dc.b        \1,0            ; CreateProc makes a copy of this name
  175.         SECTION        ProcessCode,CODE
  176. ProcessStart
  177.         ENDM
  178.  
  179.         incdir        "AsmInc:"
  180.         include        "exec/exec_lib.i"
  181.         include        "exec/memory.i"
  182.         include        "exec/interrupts.i"
  183.         include        "exec/ports.i"
  184.         include        "intuition/intuition.i"
  185.         include        "intuition/intuitionbase.i"
  186.         include        "intuition/intuition_lib.i"
  187.         include        "graphics/graphics_lib.i"
  188.         include        "libraries/dos_lib.i"
  189.         include        "libraries/dos.i"
  190.         include        "libraries/dosextens.i"
  191.         include        "hardware/intbits.i"
  192.         include        "devices/trackdisk.i"
  193.  
  194. DB        EQUR        A4
  195.  
  196. InitProcess    Detach        <'TD Process'>,4000,0
  197.         rAlloc                    ; Allocate memory for variables
  198.         rClear                    ; Clear the memory
  199.         Prepare        Exec_Call
  200.         lea        Settings1.3H(PC),A0
  201.         cmp.w        #34,LIB_VERSION(A6)
  202.         blt.S        1$
  203.         lea        Settings2.0H(PC),A0
  204. 1$        movem.l        (A0),D0-D4
  205.         movem.l        D0-D4,Version(DB)    ; Initialize variables
  206.         suba.l        A1,A1
  207.         CallLib        FindTask        ; Find us
  208.         move.l        D0,TDProcess(DB)
  209.         move.l        D0,A2
  210.         tst.l        pr_CLI(A2)
  211.         bne.S        GetLibs            ; Also works after segment-splitting
  212. WBenchStartup    lea        pr_MsgPort(A2),A0
  213.         CallLib        WaitPort        ; wait for a message
  214.         lea        pr_MsgPort(A2),A0
  215.         CallLib        GetMsg            ; then get it
  216.         move.l        D0,WBenchMsg(DB)    ; save it for later reply
  217. GetLibs
  218. GetGfx        lea        GfxName(PC),A1
  219.         CallLib        OldOpenLibrary
  220.         move.l        D0,GfxBase(DB)
  221.         beq        Error
  222. GetIntuition    lea        IntName(PC),A1
  223.         CallLib        OldOpenLibrary
  224.         move.l        D0,IntBase(DB)
  225.         beq        Error
  226. GetIOExtTD    moveq        #-1,D0
  227.         CallLib        AllocSignal
  228.         cmpi.b        #-1,D0
  229.         beq        Error
  230.         lea        TDPort(DB),A0
  231.         lea        TDPortName(PC),A1
  232.         move.l        A1,MP+LN_NAME(A0)        ; MsgPort->mp_Node.ln_Name=Name
  233.         clr.b        MP+LN_PRI(A0)            ; MsgPort->mp_Node.ln_Pri =Pri
  234.         move.b        #NT_MSGPORT,MP+LN_TYPE(A0)    ; MsgPort->mp_Node.ln_Type=NT_MSGPORT
  235.         move.b        #PA_SIGNAL,MP_FLAGS(A0)        ; MsgPort->mp_Flags      =PA_SIGNAL
  236.         move.b        D0,MP_SIGBIT(A0)        ; MsgPort->mp_SigBit      =MPSigBit
  237.         lea        TDPort(DB),A1
  238.         move.l        TDProcess(DB),MP_SIGTASK(A1)    ; MsgPort->mp_SigTask     =FindTask(0)
  239.         CallLib        AddPort
  240.         lea        IOExtTD(DB),A1
  241.         move.b        #NT_MESSAGE,IO+MN+LN_TYPE(A1)    ; IOExtTD->io_Message.mn_Node.ln_Type=NT_MESSAGE
  242.         clr.b        IO+MN+LN_PRI(A1)        ; IOExtTD->io_Message.mn_Node.ln_Pri =0
  243.         lea        TDPort(DB),A0
  244.         move.l        A0,IO+MN_REPLYPORT(A1)        ; IOExtTD->io_Message.mn_ReplyPort   =Rep
  245. GetWindow    Prepare        Intuition_Call
  246.         CallLib        OpenWorkBench
  247.         tst.l        D0
  248.         beq        Error
  249.         move.l        D0,A1
  250.         move.w        sc_Width(A1),D0
  251.         sub.w        Width(DB),D0
  252.         lsr.w        #1,D0
  253.         lea        NW(PC),A0
  254.         move.w        D0,nw_LeftEdge(A0)    ; Center the window
  255.         tst.w        Version(DB)
  256.         beq.S        1$
  257.         moveq        #0,D1
  258.         move.b        sc_BarHeight(A1),D1
  259.         move.w        D1,Height(DB)
  260.         subq.w        #7,D1
  261.         lsr.w        #1,D1
  262.         addq.w        #6,D1
  263.         move.w        D1,yPos(DB)
  264. 1$        move.w        Width(DB),nw_Width(A0)
  265.         move.w        Height(DB),nw_Height(A0)
  266.         CallLib        OpenWindow
  267.         move.l        D0,DWindow(DB)
  268.         beq        Error
  269.         move.l        D0,A0
  270.         move.l        wd_RPort(A0),Rp(DB)
  271.         move.l        wd_UserPort(A0),Up(DB)    ; UserPort
  272.         move.l        DWindow(DB),A0
  273.         suba.l        A1,A1
  274.         lea        ScrTitle(PC),A2
  275.         CallLib        SetWindowTitles
  276.         Prepare        Gfx_Call
  277.         move.l        Rp(DB),A2
  278.         move.l        A2,A1
  279.         move.w        AColor(DB),D0
  280.         CallLib        SetAPen
  281.         move.l        A2,A1
  282.         move.w        BColorI(DB),D0
  283.         CallLib        SetBPen
  284.         move.l        A2,A1
  285.         moveq        #RP_JAM2,D0
  286.         CallLib        SetDrMd
  287.         lea        TxtAttr(PC),A0
  288.         CallLib        OpenFont
  289.         move.l        D0,Font(DB)
  290.         beq.S        Error
  291.         move.l        D0,A0
  292.         move.l        A2,A1
  293.         CallLib        SetFont
  294. GetUnits    Prepare        Exec_Call        ; See which drives are available
  295.         lea        Drive3(DB),A2
  296.         moveq        #3,D2
  297. 1$        clr.l        MU_Unit(A2)
  298.         not.w        MU_Number(A2)        ; Was 0, now -1
  299.         move.w        D2,D0
  300.         moveq        #0,D1
  301.         lea        TrackName(PC),A0
  302.         lea        IOExtTD(DB),A1
  303.         CallLib        OpenDevice
  304.         tst.l        D0
  305.         bne.S        2$
  306.         lea        IOExtTD(DB),A1        ; Oh yeah, drive is available
  307.         move.l        IO_UNIT(A1),MU_Unit(A2)    ; Store address of unit-structure
  308.         CallLib        CloseDevice        ; Close Unit again
  309. 2$        addq.l        #MU_SIZE,A2
  310.         dbf        D2,1$
  311. SetInterrupt    lea        TDInterrupt(DB),A1        ; Start vertical-blanking interrupt-server
  312.         move.b        #NT_INTERRUPT,LN_TYPE(A1)    ; TDInterrupt->is_Node.ln_Type=NT_INTERRUPT
  313.         lea        TDIntName(PC),A0
  314.         move.l        A0,LN_NAME(A1)            ; TDInterrupt->is_Node.ln_Name=TDIntName
  315.         lea        TDIntServer(PC),A0
  316.         move.l        A0,IS_CODE(A1)            ; TDInterrupt->is_Code          =TDIntServer
  317.         move.l        DB,IS_DATA(A1)            ; TDInterrupt->is_Data          =DB
  318.         moveq        #INTB_VERTB,D0
  319.         CallLib        AddIntServer
  320.         bra        Main
  321.  
  322. Exit
  323. Error
  324. FreeInterrupt    Prepare        Exec_Call
  325.         lea        TDInterrupt(DB),A1
  326.         tst.l        IS_CODE(A1)        ; If this is set then server has been added
  327.         beq.S        FreeFont
  328.         moveq        #INTB_VERTB,D0
  329.         CallLib        RemIntServer
  330. FreeFont    Prepare        Gfx_Call
  331.         move.l        Font(DB),D0
  332.         beq.S        FreeWindow
  333.         move.l        D0,A1
  334.         CallLib        CloseFont
  335. FreeWindow    Prepare        Intuition_Call
  336.         move.l        DWindow(DB),D0
  337.         beq.S        FreePort
  338.         move.l        D0,A0
  339.         CallLib        CloseWindow
  340. FreePort    Prepare        Exec_Call
  341.         lea        TDPort(DB),A2
  342.         tst.b        MP_SIGBIT(A2)        ; If we have bit we also have port
  343.         beq.S        FreeIntuition
  344.         move.l        A2,A1
  345.         CallLib        RemPort
  346.         moveq        #0,D0
  347.         move.b        MP_SIGBIT(A2),D0
  348.         CallLib        FreeSignal
  349. FreeIntuition    move.l        IntBase(DB),D0
  350.         beq.S        FreeGfx
  351.         move.l        D0,A1
  352.         CallLib        CloseLibrary
  353. FreeGfx        move.l        GfxBase(DB),D0
  354.         beq.S        ReplyWB
  355.         move.l        D0,A1
  356.         CallLib        CloseLibrary
  357. ReplyWB        move.l        WBenchMsg(DB),D2
  358.         beq.S        AllDone
  359.         CallLib        Forbid
  360.         move.l        D2,A1
  361.         CallLib        ReplyMsg        ; Reply WBenchMessage if we are started from WB
  362. AllDone        rFree
  363.         moveq        #0,D0
  364.         rts
  365.  
  366. Main
  367. Change        Call        UpdateDisplay
  368. EventLoop    move.l        Up(DB),A0
  369.         moveq        #0,D0
  370.         moveq        #0,D1
  371.         move.b        MP_SIGBIT(A0),D1
  372.         bset        D1,D0
  373.         bset        #SIGBREAKB_CTRL_D,D0
  374.         Prepare        Exec_Call
  375.         CallLib        Wait
  376.         btst        #SIGBREAKB_CTRL_D,D0
  377.         beq.S        GetNextMsg
  378.         lea        TDDrives+29(PC),A1
  379.         lea        Drive3(DB),A0
  380.         moveq        #'0',D2
  381.         moveq        #3,D1
  382. 1$        move.w        MU_Number(A0),D0
  383.         bmi.S        2$
  384.         ext.l        D0
  385.         divu        #10,D0
  386.         add.w        D2,D0
  387.         move.b        D0,(A1)
  388.         swap        D0
  389.         add.w        D2,D0
  390.         move.b        D0,1(A1)
  391. 2$        subq.l        #8,A1
  392.         addq.l        #MU_SIZE,A0
  393.         dbf        D1,1$
  394.         bra.S        Change
  395.  
  396. GetNextMsg    move.l        Up(DB),A0
  397.         Prepare        Exec_Call
  398.         CallLib        GetMsg
  399.         tst.l        D0
  400.         beq.S        EventLoop
  401.         move.l        D0,A1
  402.         move.l        im_Class(A1),D2
  403.         CallLib        ReplyMsg
  404.         cmp.l        #CLOSEWINDOW,D2
  405.         beq        Exit
  406.         tst.w        Version(DB)        ; No need to change color
  407.         beq.S        3$            ; under 1.2/1.3
  408.         cmp.l        #ACTIVEWINDOW,D2
  409.         bne.S        1$
  410.         move.w        BColorA(DB),D0
  411.         bra.S        2$
  412. 1$        cmp.l        #INACTIVEWINDOW,D2
  413.         bne.S        3$
  414.         move.w        BColorI(DB),D0
  415. 2$        move.l        Rp(DB),A1
  416.         Prepare        Gfx_Call
  417.         CallLib        SetBPen
  418. 3$        Call        UpdateDisplay        ; Do some refreshing
  419.         bra.S        GetNextMsg
  420.  
  421. UpdateDisplay    Prepare        Gfx_Call
  422.         move.l        Rp(DB),A1
  423.         move.w        xPos(DB),D0
  424.         move.w        yPos(DB),D1
  425.         CallLib        Move
  426.         lea        TDDrives(PC),A0
  427.         move.l        Rp(DB),A1
  428.         moveq        #StringLength,D0
  429.         CallLib        Text
  430.         rts
  431.  
  432. * A1=DB
  433. * Inside the server the registers D0-D1/A0-A1/A5-A6 can be used
  434. * without restoring them on exit
  435. TDIntServer    Push        D2/DB
  436.         move.l        A1,DB
  437.         moveq        #0,D2            ; Don't signal
  438.         lea        Drive3(DB),A0
  439.         moveq        #3,D1
  440. 1$        move.l        MU_Unit(A0),D0
  441.         beq.S        2$            ; Does drive exist
  442.         move.l        D0,A1
  443.         add.w        UOffset(DB),A1
  444.         move.w        (A1),D0
  445.         asr.w        #1,D0
  446.         cmp.w        MU_Number(A0),D0
  447.         beq.S        2$
  448.         move.w        D0,MU_Number(A0)
  449.         moveq        #1,D2            ; Do signal
  450. 2$        addq.l        #MU_SIZE,A0
  451.         dbf        D1,1$
  452.         tst.w        D2
  453.         beq.S        3$
  454.         move.l        TDProcess(DB),A1
  455.         move.l        #SIGBREAKF_CTRL_D,D0
  456.         Prepare        Exec_Call
  457.         CallLib        Signal
  458. 3$        Pop        D2/DB
  459.         rts
  460.  
  461. * My Unit structure
  462. MU_Unit        =0            ; Address of drive-unit
  463. MU_Number    =4            ; Track number
  464. MU_SIZE        =6
  465.  
  466. * Stack variables
  467.  rStart
  468.  rAPtr        TDProcess        ; This process 
  469.  rAPtr        GfxBase
  470.  rAPtr        IntBase
  471.  rAPtr        WBenchMsg        ; Message from Workbench
  472.  rAPtr        DWindow            ; APtr to Window
  473.  rAPtr        Rp            ; APtr to RastPort
  474.  rAPtr        Up            ; APtr to UserPort
  475.  rAPtr        Font            ; APtr to Topaz-80
  476.  rStorage    IOExtTD,IOTD_SIZE    ; IOExtTD structure
  477.  rStorage    TDPort,MP_SIZE        ; MessagePort structure
  478.  rStorage    TDInterrupt,IS_SIZE    ; Interrupt structure
  479.  rStorage    Drive0,MU_SIZE
  480.  rStorage    Drive1,MU_SIZE
  481.  rStorage    Drive2,MU_SIZE
  482.  rStorage    Drive3,MU_SIZE
  483.  rWord        WordPad            ; DON'T REMOVE (Setting are now 10 words)
  484.  rWord        BColorI            ; Background color (Inactive)
  485.  rWord        BColorA            ; Background color (Active)
  486.  rWord        AColor            ; Foreground color
  487.  rWord        yPos            ; y-position of text in window
  488.  rWord        xPos            ; x-position of text in window
  489.  rWord        Height            ; Height of window
  490.  rWord        Width            ; Width of window
  491.  rWord        UOffset            ; Offset into unit structure (to get to track indicator)
  492.  rWord        Version            ; Kickstart version ID
  493.  rEnd
  494.  
  495. GfxName        dc.b        'graphics.library',0
  496. IntName        dc.b        'intuition.library',0
  497. TrackName    dc.b        'trackdisk.device',0
  498. TDIntName    dc.b        'TD Interrupt',0
  499. TDPortName    dc.b        'TD Port',0
  500. TDDrives    dc.b        'DF0: -- DF1: -- DF2: -- DF3: --',0
  501. ScrTitle    dc.b        'TD V1.0 1991 by Preben Nielsen. Thanks Olaf Barthel',0
  502.         EVEN
  503.  
  504. StringLength    =31
  505. StringSpace    =StringLength*8
  506.  
  507. Kick1        =0
  508. * Defines for hires under kickstart 1.2-1.3 (and below ?)
  509. Offset1.3    =74
  510. Width1.3H    =1+84+StringSpace
  511. Height1.3H    =10
  512. xPos1.3H    =30
  513. yPos1.3H    =7
  514. AColor1.3H    =0
  515. BColor1.3H    =1
  516.  
  517. Kick2        =1
  518. * Defines for hires under kickstart 2.0 (and up ?)
  519. Offset2.0    =54
  520. Width2.0H    =51+StringSpace
  521. Height2.0H    =11
  522. xPos2.0H    =23
  523. yPos2.0H    =8
  524. AColor2.0H    =1
  525. BColor2.0HA    =3        ; Active background color
  526. BColor2.0HI    =0        ; Inactive background color
  527.  
  528. Settings1.3H    dc.w        Kick1,Offset1.3,Width1.3H,Height1.3H,xPos1.3H,yPos1.3H,AColor1.3H,BColor1.3H,BColor1.3H,0
  529. Settings2.0H    dc.w        Kick2,Offset2.0,Width2.0H,Height2.0H,xPos2.0H,yPos2.0H,AColor2.0H,BColor2.0HA,BColor2.0HI,0
  530.  
  531. IDCMP_Flags    =        CLOSEWINDOW|INACTIVEWINDOW|ACTIVEWINDOW
  532. Other_Flags    =        RMBTRAP|WINDOWCLOSE|WINDOWDEPTH|WINDOWDRAG
  533. NW        dc.w        0,0,0,0
  534.         dc.b        0,1
  535.         dc.l        IDCMP_Flags,Other_Flags
  536.         dc.l        0,0,0,0,0
  537.         dc.w        0,0,0,0,WBENCHSCREEN
  538.  
  539. TxtAttr        dc.l        FontName
  540.         dc.w        TOPAZ_EIGHTY
  541.         dc.b        FS_NORMAL,FPB_ROMFONT
  542. FontName    dc.b        'topaz.font',0
  543.         END
  544.  
  545.